<?php

class HTech_Form_Decorator_Button extends Zend_Form_Decorator_Abstract
{
    /*
     * Use this format for dojo style buttons
     *
    protected $_format = '<dt></dt>
                          <dd id="%s-element">
                              <button dojoType="dijit.form.Button" type="%s" iconClass="%s" id="%s">%s</button>
                          </dd>';
    
     * 
     */
    protected $_format = '<dt></dt>
                          <dd id="%s-element">
                              <input type="%s" name="Submit" id="Submit" value="%s" />
                          </dd>';    
    
    public function render($content)
    {
        $element = $this->getElement();
        $label = $element->getLabel();
        $id = $element->getId();
        //return sprintf($this->_format,$id,$this->getOption('type'),$this->getOption('type'),$id,$label);
        //use line above for dojo style buttons
        return sprintf($this->_format,$id,$this->getOption('type'),$label);
    }
}
